Integrand size = 40, antiderivative size = 198 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\left (4 a^2 B+3 b^2 B+6 a b C\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {\left (4 b^2 C+5 a (2 b B+a C)\right ) \tan (c+d x)}{5 d}+\frac {\left (4 a^2 B+3 b^2 B+6 a b C\right ) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b (5 b B+6 a C) \sec ^3(c+d x) \tan (c+d x)}{20 d}+\frac {b C \sec ^3(c+d x) (a+b \sec (c+d x)) \tan (c+d x)}{5 d}+\frac {\left (4 b^2 C+5 a (2 b B+a C)\right ) \tan ^3(c+d x)}{15 d} \]
1/8*(4*B*a^2+3*B*b^2+6*C*a*b)*arctanh(sin(d*x+c))/d+1/5*(4*C*b^2+5*a*(2*B* b+C*a))*tan(d*x+c)/d+1/8*(4*B*a^2+3*B*b^2+6*C*a*b)*sec(d*x+c)*tan(d*x+c)/d +1/20*b*(5*B*b+6*C*a)*sec(d*x+c)^3*tan(d*x+c)/d+1/5*b*C*sec(d*x+c)^3*(a+b* sec(d*x+c))*tan(d*x+c)/d+1/15*(4*C*b^2+5*a*(2*B*b+C*a))*tan(d*x+c)^3/d
Time = 1.00 (sec) , antiderivative size = 150, normalized size of antiderivative = 0.76 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {15 \left (4 a^2 B+3 b^2 B+6 a b C\right ) \text {arctanh}(\sin (c+d x))+\tan (c+d x) \left (15 \left (4 a^2 B+3 b^2 B+6 a b C\right ) \sec (c+d x)+30 b (b B+2 a C) \sec ^3(c+d x)+8 \left (15 \left (2 a b B+a^2 C+b^2 C\right )+5 \left (2 a b B+a^2 C+2 b^2 C\right ) \tan ^2(c+d x)+3 b^2 C \tan ^4(c+d x)\right )\right )}{120 d} \]
(15*(4*a^2*B + 3*b^2*B + 6*a*b*C)*ArcTanh[Sin[c + d*x]] + Tan[c + d*x]*(15 *(4*a^2*B + 3*b^2*B + 6*a*b*C)*Sec[c + d*x] + 30*b*(b*B + 2*a*C)*Sec[c + d *x]^3 + 8*(15*(2*a*b*B + a^2*C + b^2*C) + 5*(2*a*b*B + a^2*C + 2*b^2*C)*Ta n[c + d*x]^2 + 3*b^2*C*Tan[c + d*x]^4)))/(120*d)
Time = 1.05 (sec) , antiderivative size = 170, normalized size of antiderivative = 0.86, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {3042, 4560, 3042, 4514, 3042, 4535, 3042, 4254, 2009, 4534, 3042, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^2(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 4560 |
\(\displaystyle \int \sec ^3(c+d x) (a+b \sec (c+d x))^2 (B+C \sec (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (B+C \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 4514 |
\(\displaystyle \frac {1}{5} \int \sec ^3(c+d x) \left (b (5 b B+6 a C) \sec ^2(c+d x)+\left (4 C b^2+5 a (2 b B+a C)\right ) \sec (c+d x)+a (5 a B+3 b C)\right )dx+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \int \csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (b (5 b B+6 a C) \csc \left (c+d x+\frac {\pi }{2}\right )^2+\left (4 C b^2+5 a (2 b B+a C)\right ) \csc \left (c+d x+\frac {\pi }{2}\right )+a (5 a B+3 b C)\right )dx+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))}{5 d}\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle \frac {1}{5} \left (\left (5 a (a C+2 b B)+4 b^2 C\right ) \int \sec ^4(c+d x)dx+\int \sec ^3(c+d x) \left (b (5 b B+6 a C) \sec ^2(c+d x)+a (5 a B+3 b C)\right )dx\right )+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\left (5 a (a C+2 b B)+4 b^2 C\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )^4dx+\int \csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (b (5 b B+6 a C) \csc \left (c+d x+\frac {\pi }{2}\right )^2+a (5 a B+3 b C)\right )dx\right )+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))}{5 d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {1}{5} \left (\int \csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (b (5 b B+6 a C) \csc \left (c+d x+\frac {\pi }{2}\right )^2+a (5 a B+3 b C)\right )dx-\frac {\left (5 a (a C+2 b B)+4 b^2 C\right ) \int \left (\tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}\right )+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))}{5 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{5} \left (\int \csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (b (5 b B+6 a C) \csc \left (c+d x+\frac {\pi }{2}\right )^2+a (5 a B+3 b C)\right )dx-\frac {\left (5 a (a C+2 b B)+4 b^2 C\right ) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))}{5 d}\) |
\(\Big \downarrow \) 4534 |
\(\displaystyle \frac {1}{5} \left (\frac {5}{4} \left (4 a^2 B+6 a b C+3 b^2 B\right ) \int \sec ^3(c+d x)dx-\frac {\left (5 a (a C+2 b B)+4 b^2 C\right ) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}+\frac {b (6 a C+5 b B) \tan (c+d x) \sec ^3(c+d x)}{4 d}\right )+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\frac {5}{4} \left (4 a^2 B+6 a b C+3 b^2 B\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-\frac {\left (5 a (a C+2 b B)+4 b^2 C\right ) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}+\frac {b (6 a C+5 b B) \tan (c+d x) \sec ^3(c+d x)}{4 d}\right )+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))}{5 d}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {1}{5} \left (\frac {5}{4} \left (4 a^2 B+6 a b C+3 b^2 B\right ) \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {\left (5 a (a C+2 b B)+4 b^2 C\right ) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}+\frac {b (6 a C+5 b B) \tan (c+d x) \sec ^3(c+d x)}{4 d}\right )+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\frac {5}{4} \left (4 a^2 B+6 a b C+3 b^2 B\right ) \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {\left (5 a (a C+2 b B)+4 b^2 C\right ) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}+\frac {b (6 a C+5 b B) \tan (c+d x) \sec ^3(c+d x)}{4 d}\right )+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))}{5 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{5} \left (\frac {5}{4} \left (4 a^2 B+6 a b C+3 b^2 B\right ) \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {\left (5 a (a C+2 b B)+4 b^2 C\right ) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}+\frac {b (6 a C+5 b B) \tan (c+d x) \sec ^3(c+d x)}{4 d}\right )+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))}{5 d}\) |
(b*C*Sec[c + d*x]^3*(a + b*Sec[c + d*x])*Tan[c + d*x])/(5*d) + ((b*(5*b*B + 6*a*C)*Sec[c + d*x]^3*Tan[c + d*x])/(4*d) + (5*(4*a^2*B + 3*b^2*B + 6*a* b*C)*(ArcTanh[Sin[c + d*x]]/(2*d) + (Sec[c + d*x]*Tan[c + d*x])/(2*d)))/4 - ((4*b^2*C + 5*a*(2*b*B + a*C))*(-Tan[c + d*x] - Tan[c + d*x]^3/3))/d)/5
3.8.75.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-b)*B* Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*(m + n))), x] + Simp[1/(m + n) Int[(a + b*Csc[e + f*x])^(m - 2)*(d*Csc[e + f*x])^n* Simp[a^2*A*(m + n) + a*b*B*n + (a*(2*A*b + a*B)*(m + n) + b^2*B*(m + n - 1) )*Csc[e + f*x] + b*(A*b*(m + n) + a*B*(2*m + n - 1))*Csc[e + f*x]^2, x], x] , x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] && !(IGtQ[n, 1] && !IntegerQ[m])
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1) )), x] + Simp[(C*m + A*(m + 1))/(m + 1) Int[(b*Csc[e + f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] && !LeQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, x]
Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_. )*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.) *(x_)]*(d_.))^(n_.), x_Symbol] :> Simp[1/b^2 Int[(a + b*Csc[e + f*x])^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Time = 1.11 (sec) , antiderivative size = 171, normalized size of antiderivative = 0.86
method | result | size |
parts | \(\frac {\left (B \,b^{2}+2 C a b \right ) \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}-\frac {\left (2 B a b +C \,a^{2}\right ) \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {B \,a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}-\frac {C \,b^{2} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}\) | \(171\) |
derivativedivides | \(\frac {B \,a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-C \,a^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-2 B a b \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+2 C a b \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+B \,b^{2} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-C \,b^{2} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}\) | \(221\) |
default | \(\frac {B \,a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-C \,a^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-2 B a b \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+2 C a b \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+B \,b^{2} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-C \,b^{2} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}\) | \(221\) |
parallelrisch | \(\frac {-60 \left (B \,a^{2}+\frac {3}{4} B \,b^{2}+\frac {3}{2} C a b \right ) \left (\cos \left (5 d x +5 c \right )+5 \cos \left (3 d x +3 c \right )+10 \cos \left (d x +c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+60 \left (B \,a^{2}+\frac {3}{4} B \,b^{2}+\frac {3}{2} C a b \right ) \left (\cos \left (5 d x +5 c \right )+5 \cos \left (3 d x +3 c \right )+10 \cos \left (d x +c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (240 B \,a^{2}+420 B \,b^{2}+840 C a b \right ) \sin \left (2 d x +2 c \right )+\left (800 B a b +400 C \,a^{2}+320 C \,b^{2}\right ) \sin \left (3 d x +3 c \right )+\left (120 B \,a^{2}+90 B \,b^{2}+180 C a b \right ) \sin \left (4 d x +4 c \right )+\left (160 B a b +80 C \,a^{2}+64 C \,b^{2}\right ) \sin \left (5 d x +5 c \right )+640 \left (B a b +\frac {1}{2} C \,a^{2}+C \,b^{2}\right ) \sin \left (d x +c \right )}{120 d \left (\cos \left (5 d x +5 c \right )+5 \cos \left (3 d x +3 c \right )+10 \cos \left (d x +c \right )\right )}\) | \(294\) |
norman | \(\frac {-\frac {4 \left (50 B a b +25 C \,a^{2}+29 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{15 d}+\frac {\left (4 B \,a^{2}-16 B a b +5 B \,b^{2}-8 C \,a^{2}+10 C a b -8 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{4 d}-\frac {\left (4 B \,a^{2}+16 B a b +5 B \,b^{2}+8 C \,a^{2}+10 C a b +8 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {\left (12 B \,a^{2}-64 B a b +3 B \,b^{2}-32 C \,a^{2}+6 C a b -16 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{6 d}+\frac {\left (12 B \,a^{2}+64 B a b +3 B \,b^{2}+32 C \,a^{2}+6 C a b +16 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{5}}-\frac {\left (4 B \,a^{2}+3 B \,b^{2}+6 C a b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {\left (4 B \,a^{2}+3 B \,b^{2}+6 C a b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(325\) |
risch | \(-\frac {i \left (60 B \,a^{2} {\mathrm e}^{9 i \left (d x +c \right )}+45 B \,b^{2} {\mathrm e}^{9 i \left (d x +c \right )}+90 C a b \,{\mathrm e}^{9 i \left (d x +c \right )}+120 B \,a^{2} {\mathrm e}^{7 i \left (d x +c \right )}+210 B \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}+420 C a b \,{\mathrm e}^{7 i \left (d x +c \right )}-480 B a b \,{\mathrm e}^{6 i \left (d x +c \right )}-240 C \,a^{2} {\mathrm e}^{6 i \left (d x +c \right )}-1120 B a b \,{\mathrm e}^{4 i \left (d x +c \right )}-560 C \,a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-640 C \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-120 B \,a^{2} {\mathrm e}^{3 i \left (d x +c \right )}-210 B \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-420 C a b \,{\mathrm e}^{3 i \left (d x +c \right )}-800 B a b \,{\mathrm e}^{2 i \left (d x +c \right )}-400 C \,a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-320 C \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-60 a^{2} B \,{\mathrm e}^{i \left (d x +c \right )}-45 B \,b^{2} {\mathrm e}^{i \left (d x +c \right )}-90 C b a \,{\mathrm e}^{i \left (d x +c \right )}-160 B a b -80 C \,a^{2}-64 C \,b^{2}\right )}{60 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B \,a^{2}}{2 d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B \,b^{2}}{8 d}+\frac {3 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{4 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B \,a^{2}}{2 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B \,b^{2}}{8 d}-\frac {3 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{4 d}\) | \(462\) |
(B*b^2+2*C*a*b)/d*(-(-1/4*sec(d*x+c)^3-3/8*sec(d*x+c))*tan(d*x+c)+3/8*ln(s ec(d*x+c)+tan(d*x+c)))-(2*B*a*b+C*a^2)/d*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c )+B*a^2/d*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c)))-C*b^2/ d*(-8/15-1/5*sec(d*x+c)^4-4/15*sec(d*x+c)^2)*tan(d*x+c)
Time = 0.28 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.05 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {15 \, {\left (4 \, B a^{2} + 6 \, C a b + 3 \, B b^{2}\right )} \cos \left (d x + c\right )^{5} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (4 \, B a^{2} + 6 \, C a b + 3 \, B b^{2}\right )} \cos \left (d x + c\right )^{5} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (16 \, {\left (5 \, C a^{2} + 10 \, B a b + 4 \, C b^{2}\right )} \cos \left (d x + c\right )^{4} + 15 \, {\left (4 \, B a^{2} + 6 \, C a b + 3 \, B b^{2}\right )} \cos \left (d x + c\right )^{3} + 24 \, C b^{2} + 8 \, {\left (5 \, C a^{2} + 10 \, B a b + 4 \, C b^{2}\right )} \cos \left (d x + c\right )^{2} + 30 \, {\left (2 \, C a b + B b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, d \cos \left (d x + c\right )^{5}} \]
integrate(sec(d*x+c)^2*(a+b*sec(d*x+c))^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")
1/240*(15*(4*B*a^2 + 6*C*a*b + 3*B*b^2)*cos(d*x + c)^5*log(sin(d*x + c) + 1) - 15*(4*B*a^2 + 6*C*a*b + 3*B*b^2)*cos(d*x + c)^5*log(-sin(d*x + c) + 1 ) + 2*(16*(5*C*a^2 + 10*B*a*b + 4*C*b^2)*cos(d*x + c)^4 + 15*(4*B*a^2 + 6* C*a*b + 3*B*b^2)*cos(d*x + c)^3 + 24*C*b^2 + 8*(5*C*a^2 + 10*B*a*b + 4*C*b ^2)*cos(d*x + c)^2 + 30*(2*C*a*b + B*b^2)*cos(d*x + c))*sin(d*x + c))/(d*c os(d*x + c)^5)
\[ \int \sec ^2(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (B + C \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{2} \sec ^{3}{\left (c + d x \right )}\, dx \]
Time = 0.24 (sec) , antiderivative size = 276, normalized size of antiderivative = 1.39 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {80 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a^{2} + 160 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a b + 16 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} C b^{2} - 30 \, C a b {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 15 \, B b^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 60 \, B a^{2} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{240 \, d} \]
integrate(sec(d*x+c)^2*(a+b*sec(d*x+c))^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")
1/240*(80*(tan(d*x + c)^3 + 3*tan(d*x + c))*C*a^2 + 160*(tan(d*x + c)^3 + 3*tan(d*x + c))*B*a*b + 16*(3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan( d*x + c))*C*b^2 - 30*C*a*b*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 15*B*b^2*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c) ^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 60*B*a^2*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)))/d
Leaf count of result is larger than twice the leaf count of optimal. 528 vs. \(2 (186) = 372\).
Time = 0.35 (sec) , antiderivative size = 528, normalized size of antiderivative = 2.67 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {15 \, {\left (4 \, B a^{2} + 6 \, C a b + 3 \, B b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 15 \, {\left (4 \, B a^{2} + 6 \, C a b + 3 \, B b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (60 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 120 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 240 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 150 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 75 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 120 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 120 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 320 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 640 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 60 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 30 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 160 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 400 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 800 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 464 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 120 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 320 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 640 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 60 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 30 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 160 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 60 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 120 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 240 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 150 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 75 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 120 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5}}}{120 \, d} \]
1/120*(15*(4*B*a^2 + 6*C*a*b + 3*B*b^2)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 15*(4*B*a^2 + 6*C*a*b + 3*B*b^2)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 2 *(60*B*a^2*tan(1/2*d*x + 1/2*c)^9 - 120*C*a^2*tan(1/2*d*x + 1/2*c)^9 - 240 *B*a*b*tan(1/2*d*x + 1/2*c)^9 + 150*C*a*b*tan(1/2*d*x + 1/2*c)^9 + 75*B*b^ 2*tan(1/2*d*x + 1/2*c)^9 - 120*C*b^2*tan(1/2*d*x + 1/2*c)^9 - 120*B*a^2*ta n(1/2*d*x + 1/2*c)^7 + 320*C*a^2*tan(1/2*d*x + 1/2*c)^7 + 640*B*a*b*tan(1/ 2*d*x + 1/2*c)^7 - 60*C*a*b*tan(1/2*d*x + 1/2*c)^7 - 30*B*b^2*tan(1/2*d*x + 1/2*c)^7 + 160*C*b^2*tan(1/2*d*x + 1/2*c)^7 - 400*C*a^2*tan(1/2*d*x + 1/ 2*c)^5 - 800*B*a*b*tan(1/2*d*x + 1/2*c)^5 - 464*C*b^2*tan(1/2*d*x + 1/2*c) ^5 + 120*B*a^2*tan(1/2*d*x + 1/2*c)^3 + 320*C*a^2*tan(1/2*d*x + 1/2*c)^3 + 640*B*a*b*tan(1/2*d*x + 1/2*c)^3 + 60*C*a*b*tan(1/2*d*x + 1/2*c)^3 + 30*B *b^2*tan(1/2*d*x + 1/2*c)^3 + 160*C*b^2*tan(1/2*d*x + 1/2*c)^3 - 60*B*a^2* tan(1/2*d*x + 1/2*c) - 120*C*a^2*tan(1/2*d*x + 1/2*c) - 240*B*a*b*tan(1/2* d*x + 1/2*c) - 150*C*a*b*tan(1/2*d*x + 1/2*c) - 75*B*b^2*tan(1/2*d*x + 1/2 *c) - 120*C*b^2*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^5)/d
Time = 20.71 (sec) , antiderivative size = 359, normalized size of antiderivative = 1.81 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\mathrm {atanh}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {B\,a^2}{2}+\frac {3\,C\,a\,b}{4}+\frac {3\,B\,b^2}{8}\right )}{2\,B\,a^2+3\,C\,a\,b+\frac {3\,B\,b^2}{2}}\right )\,\left (B\,a^2+\frac {3\,C\,a\,b}{2}+\frac {3\,B\,b^2}{4}\right )}{d}-\frac {\left (2\,C\,a^2-\frac {5\,B\,b^2}{4}-B\,a^2+2\,C\,b^2+4\,B\,a\,b-\frac {5\,C\,a\,b}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (2\,B\,a^2+\frac {B\,b^2}{2}-\frac {16\,C\,a^2}{3}-\frac {8\,C\,b^2}{3}-\frac {32\,B\,a\,b}{3}+C\,a\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {20\,C\,a^2}{3}+\frac {40\,B\,a\,b}{3}+\frac {116\,C\,b^2}{15}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-2\,B\,a^2-\frac {B\,b^2}{2}-\frac {16\,C\,a^2}{3}-\frac {8\,C\,b^2}{3}-\frac {32\,B\,a\,b}{3}-C\,a\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (B\,a^2+\frac {5\,B\,b^2}{4}+2\,C\,a^2+2\,C\,b^2+4\,B\,a\,b+\frac {5\,C\,a\,b}{2}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]
(atanh((4*tan(c/2 + (d*x)/2)*((B*a^2)/2 + (3*B*b^2)/8 + (3*C*a*b)/4))/(2*B *a^2 + (3*B*b^2)/2 + 3*C*a*b))*(B*a^2 + (3*B*b^2)/4 + (3*C*a*b)/2))/d - (t an(c/2 + (d*x)/2)^5*((20*C*a^2)/3 + (116*C*b^2)/15 + (40*B*a*b)/3) - tan(c /2 + (d*x)/2)^9*(B*a^2 + (5*B*b^2)/4 - 2*C*a^2 - 2*C*b^2 - 4*B*a*b + (5*C* a*b)/2) - tan(c/2 + (d*x)/2)^3*(2*B*a^2 + (B*b^2)/2 + (16*C*a^2)/3 + (8*C* b^2)/3 + (32*B*a*b)/3 + C*a*b) + tan(c/2 + (d*x)/2)^7*(2*B*a^2 + (B*b^2)/2 - (16*C*a^2)/3 - (8*C*b^2)/3 - (32*B*a*b)/3 + C*a*b) + tan(c/2 + (d*x)/2) *(B*a^2 + (5*B*b^2)/4 + 2*C*a^2 + 2*C*b^2 + 4*B*a*b + (5*C*a*b)/2))/(d*(5* tan(c/2 + (d*x)/2)^2 - 10*tan(c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x)/2)^6 - 5*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 - 1))